package com.ruoyi.washer.mapper;

import java.util.List;
import com.ruoyi.washer.domain.XwPurchaseOrder;
import org.apache.ibatis.annotations.Param;

/**
 * 购买记录Mapper接口
 *
 * @author hawking
 * @date 2023-12-15
 */
public interface XwPurchaseOrderMapper
{
    /**
     * 查询购买记录
     *
     * @param orderNo 购买记录主键
     * @return 购买记录
     */
    public XwPurchaseOrder selectXwPurchaseOrderByOrderNo(Long orderNo);

    public XwPurchaseOrder selectXwPurchaseOrderByOutTradeNo(String outTradeNo);

    public XwPurchaseOrder getClientOrdersByWashballSn(@Param("washballSn")String  washballSn);

    public int updateRentOutTimeOrders();

    /**
     * 查询购买记录列表
     *
     * @param xwPurchaseOrder 购买记录
     * @return 购买记录集合
     */
    public List<XwPurchaseOrder> selectXwPurchaseOrderList(XwPurchaseOrder xwPurchaseOrder);

    public List<XwPurchaseOrder> getClientOrdersByOpenId(String openId);

    public List<XwPurchaseOrder> getEnduserOrdersByOpenId(String openId);

    public List<XwPurchaseOrder> getAgentOrdersByOpenId(String openId);

    public List<XwPurchaseOrder> getBuyDivideOrderList();

    public List<XwPurchaseOrder> getRentDivideOrderList();

    /**
     * 新增购买记录
     *
     * @param xwPurchaseOrder 购买记录
     * @return 结果
     */
    public int insertXwPurchaseOrder(XwPurchaseOrder xwPurchaseOrder);

    /**
     * 修改购买记录
     *
     * @param xwPurchaseOrder 购买记录
     * @return 结果
     */
    public int updateXwPurchaseOrder(XwPurchaseOrder xwPurchaseOrder);

    /**
     * 删除购买记录
     *
     * @param orderNo 购买记录主键
     * @return 结果
     */
    public int deleteXwPurchaseOrderByOrderNo(Long orderNo);

    /**
     * 批量删除购买记录
     *
     * @param orderNos 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteXwPurchaseOrderByOrderNos(Long[] orderNos);
}
